import os


def is_run_in_exe():
    """
    判断是否已经打包为exe
    """
    import sys
    ret = 0
    if hasattr(sys, "_MEIPASS") and sys._MEIPASS is not None:
        ret = 1
    return ret


def get_current_path(path):
    path = path if not is_run_in_exe() else os.path.join('_internal', path)
    return path
